import request from "@/utils/request";

// 获得采购类目分页
export function getContentPage(query) {
  return request({
    url: "/store/content/page",
    method: "get",
    params: query,
  });
}

// 创建采购类目
export function CreateContentPage(data) {
  return request({
    url: "/store/content/create",
    method: "post",
    data: data,
  });
}

// 更新采购类目
export function UpdateContentPage(data) {
  return request({
    url: "/store/content/update",
    method: "put",
    data: data,
  });
}

// 获得采购类目
export function getContentPageInfo(query) {
  return request({
    url: "/store/content/get",
    method: "get",
    params: query,
  });
}

// 删除采购类目
export function DeleteContentPage(query) {
  return request({
    url: "/store/content/delete",
    method: "delete",
    params: query,
  });
}

// 门店采购

// 获得门店采购分页
export function getStoreBuyPage(data) {
  return request({
    url: "/store/buy/page",
    method: "post",
    data: data,
  });
}

// 创建门店采购
export function CreateStoreBuy(data) {
  return request({
    url: "/store/buy/create",
    method: "post",
    data: data,
  });
}

// 更新门店采购
export function UpdateStoreBuy(data) {
  return request({
    url: "/store/buy/update",
    method: "put",
    data: data,
  });
}

// 获得门店采购
export function getStoreBuyPageInfo(query) {
  return request({
    url: "/store/buy/get",
    method: "get",
    params: query,
  });
}

// 删除门店采购
export function DeleteStoreBuy(query) {
  return request({
    url: "/store/buy/delete",
    method: "delete",
    params: query,
  });
}

// 获得所有采购类目
export function getContentPageAll(query) {
  return request({
    url: "/store/content/all",
    method: "get",
    params: query,
  });
}

// 发货
export function sendbuy(data) {
  return request({
    url: "/store/buy/send",
    method: "post",
    data: data,
  });
}

// 发货
export function Checkbuy(data) {
  return request({
    url: "/store/buy/check",
    method: "post",
    data: data,
  });
}

// 门店采购 导出
export function StoreBuyExport(data) {
  return request({
    url: "/store/buy/export-excel",
    method: "post",
    data: data,
    responseType: "blob",
  });
}

// 获得门店采购 详情
export function getStoreBuyInfo(query) {
  return request({
    url: "/store/buy/get",
    method: "get",
    params: query,
  });
}
